import service from '@/utils/request'
// 获取列表
export const getTagList = params => service({
  url: '/admin/subject/tag',
  params
})

// 获取详情信息
export const getTagId = id => service({
  url: `/admin/subject/tag/${id}`,
  method: 'GET'
})

// 删除
export const delTag = id => service({
  url: `/admin/subject/tag/${id}`,
  method: 'DELETE'
})

// 请求学科信息
export const getTreeList = () => service({
  url: '/admin/subject/tree',
  method: 'GET'
})

// 切换隐藏显示
export const putIsShow = (data) => service({
  url: `/admin/subject/tag/${data.id}`,
  method: 'PUT',
  data
})

// 新增
export const addTag = (data) => service({
  url: `/admin/subject/tag`,
  method: 'POST',
  data
})

// 修改
export const editTag = (data) => service({
  url: `/admin/subject/tag/${data.id}`,
  method: 'PUT',
  data
})
